#include<stdio.h>
int main()
{
char a[100],in=0,space=0,digit=0,cha=0,others=0;
printf("please input some chaeacters\n");
gets(a);
for(in=0;a[in];in++)
{
if(a[in]==' ')
space++;
else if(a[in]<='Z'&&a[in]>='A'||a[in]<='z'&&a[in]>='a')
cha++;
else if(a[in]<='9'&&a[in]>='0')
digit++;
else
others++;
}
printf("space=%d\ncha=%d\ndigit=%d\nothers=%d\n",space,cha,digit,others);	
return 0;
}
